home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 8 / HYPERLIB-1993-VOL8-CD1.ISO.7z / HYPERLIB-1993-VOL8-CD1.ISO / Wingz / Demo for 9inch Monitor / WZAP / ADDRESS.SCZ (.txt) next >
Wingz Script  |  1992-08-11  |  15KB  |  391 lines

  1. WNGZWZSC01200%
  2. ADDRESS.SCZ:cancel_op = 1
  3. 7ADDRESS.SCZ:cancel_op = 0; call ADDRESS.SCZ:do_remove()
  4. add list box "
  5. '"  at (.2inch,.2inch)+(1.7inch,2.7inch)5
  6. add list box items "
  7. 433333y@
  8. ADDRESS.SCZ:cancel_op = 1
  9. 5ADDRESS.SCZ:cancel_op = 0;call  ADDRESS.SCZ:SetData()
  10. kyoto
  11. 433333y@
  12. 433333y@
  13. 433333y@
  14. 433333y@
  15. 433333y@
  16. gfffffw@
  17. gfffffw@
  18. 433333y@
  19. 433333y@
  20. 433333y@
  21. 433333y@
  22. 433333y@
  23. 433333y@
  24. 433333y@
  25. 433333y@
  26. 433333y@
  27. gPRSHEET.SCZ
  28. System
  29. ADDRESS.WKZ
  30. max_line
  31. state
  32. addr1
  33. addr2    
  34. cancel_op
  35. select_line
  36. operation_string
  37. data_f
  38. select_data
  39. do_setting
  40. extract_data
  41. max_line_count
  42. main_dialog
  43. remove_data
  44. do_select
  45. do_remove
  46. add_data
  47. update_data
  48. SetDatam
  49. ad_helpq
  50.         ADDRESS.SCZ 
  51.         copyright 1992 (C) ASCII Corporation
  52.         1992/1/4 Author taku-k
  53. define yomi, name, sex, age, tel, zip, state, city, addr1, addr2
  54. define cancel_op, i, select_line, operation_string, data_f
  55. function select_data()
  56.     unselect
  57.     operation_string = "
  58.     if  do_setting()
  59.         data find
  60.     end if
  61. end function
  62. function extract_data()
  63.     unselect
  64.     call max_line_count()
  65.     operation_string = "
  66.     if  do_setting()
  67.         repaint selections off
  68.         select range makerange(27,3,36,2+ADDRESS.WKZ:max_line)
  69.         clear
  70.         repaint selections on
  71.         select range aa2..aj2
  72.         select more range l3..u3
  73.         data extract
  74.         call max_line_count()
  75.     end if
  76. end function
  77. function max_line_count()
  78.     ADDRESS.WKZ:max_line = 1
  79.     while not isblank(range(makecell(27,ADDRESS.WKZ:max_line+1)))
  80.         ADDRESS.WKZ:max_line = ADDRESS.WKZ:max_line + 1
  81.     end while
  82. end function
  83. function do_setting()
  84.     if not main_dialog(2)
  85.         repaint selections off
  86.         select range l3..u3
  87.         clear
  88.         repaint selections on
  89.         if yomi <> ""
  90.             put yomi into l3
  91.         end if
  92.         if name <> ""
  93.             put name into m3
  94.         end if
  95.         case sex
  96.             when 1
  97.                 put "
  98. j" into n3
  99.             when 2
  100.                 put "
  101. " into n3
  102.             when 3
  103.                 put "*" into n3
  104.         end case
  105.         if age
  106.             put age into  o3
  107.         end if
  108.         if tel <> ""
  109.             put tel into  p3
  110.         end if
  111.         if zip <> ""
  112.             put zip into  q3
  113.         end if
  114.         if state <> ""
  115.             put state into  r3
  116.         end if
  117.         if city <> ""
  118.             put city into  s3
  119.         end if
  120.         if addr1 <> ""
  121.             put addr1 into  t3
  122.         end if
  123.         if addr2 <> ""
  124.             put addr2 into  u3
  125.         end if
  126.         return 1
  127.     else
  128.         return 0
  129.     end if
  130. end function
  131. function remove_data()
  132.     operation_string = "
  133.     call do_select()
  134.     if not cancel_op
  135.         repaint selections off
  136.         select range range(makerange(1,select_line +3, 32768, select_line +3))
  137.         delete
  138.         unselect
  139.         repaint selections on
  140.     end if
  141. end function
  142. function do_select()
  143.     cancel_op = 1
  144.     new modal dialog box at(-1, -1)(2.8inch, 3inch)
  145.     add push button operation_string, "
  146. " at ( 2.1inch, 1.5inch)+(.5inch, 1.3inch)
  147.         script "ADDRESS.SCZ:cancel_op = 1"
  148.         dialog cancel push button
  149.         select control 1
  150.         script "ADDRESS.SCZ:cancel_op = 0; call ADDRESS.SCZ:do_remove()"
  151.         dialog default push button
  152.     i = 0
  153.     while not isblank(range(makecell(2, 4+i )))
  154.         if not i
  155.             run "add list box """ & indirect(makecell(2,4)) & """  at (.2inch,.2inch)+(1.7inch,2.7inch)"
  156.             i = 1
  157.         else
  158.             run "add list box items """ & indirect(makecell(2, 4+i ))  & """"
  159.             i = i + 1
  160.         end if
  161.     end while
  162.     show scroll bar list box
  163.     use dialog box
  164. end function
  165. function do_remove()
  166.     select_line = ctvalue(3,0)
  167. end function
  168. function add_data()
  169.     cancel_op = 0
  170.     operation_string = "
  171.     while not  main_dialog(1)
  172.         repaint selections off
  173.         select range a4..avlh4
  174.         insert
  175.         put yomi into a4
  176.         put name into b4
  177.            if sex-1
  178.             put "
  179. " into c4
  180.         else
  181.             put "
  182. j" into c4
  183.         end if
  184.         put age into d4
  185.         put tel into e4
  186.         put zip into f4
  187.         put state into g4
  188.         put city into h4
  189.         put addr1 into i4
  190.         put addr2 into j4
  191.         repaint selections on
  192.         format general
  193.         select range a4
  194.     end while
  195. end function
  196. function update_data()
  197.     operation_string = "
  198.     call do_select()
  199.     if not cancel_op and select_line
  200.         if not  main_dialog(0) 
  201.             put yomi into makecell(1, select_line + 3 )
  202.             put name into makecell(2, select_line + 3 )
  203.             if sex -1
  204.                 put "
  205. " into makecell(3, select_line + 3 )
  206.             else
  207.                 put "
  208. j" into makecell(3, select_line + 3 )
  209.             end if
  210.             put age into makecell(4, select_line + 3 )
  211.             put tel into makecell(5, select_line + 3 )
  212.             put zip into makecell(6, select_line + 3 )
  213.             put state into makecell(7, select_line + 3 )
  214.             put city into makecell(8, select_line + 3 )
  215.             put addr1 into makecell(9, select_line + 3 )
  216.             put addr2 into makecell(10, select_line + 3 )
  217.         end if
  218.     end if
  219. end function
  220. function main_dialog(n)
  221.     new modal dialog box at(-1,-1) (7inch, 4.5inch)
  222.     add push button  operation_string, "
  223. " at (1inch,4.0inch)+(2.4inch,0.28inch)
  224.         script "ADDRESS.SCZ:cancel_op = 1"
  225.         dialog cancel push button
  226.         select control 1
  227.         script "ADDRESS.SCZ:cancel_op = 0;call  ADDRESS.SCZ:SetData()"
  228.         dialog default push button
  229.     add text operation_string at (0.2inch,0.05inch)+(6inch,0.48inch)
  230.         no line border
  231.         text size 24
  232.         text font "kyoto"
  233.     add text "
  234. " at (0.5inch,1inch)+(1.2inch,0.28inch)
  235.         no line border
  236.         add field at (1.5inch,1inch)+(2.8inch,0.28inch)
  237.         select field text from 1 to 1
  238.         if not n
  239.             field text indirect(makecell(1, select_line+ 3))
  240.         end if
  241.     add text "
  242. " at (0.5inch,1.4inch)+(1.2inch,0.28inch)
  243.         no line border
  244.         add field at(1.5inch,1.4inch)+(2.8inch,0.28inch)
  245.         if not n
  246.             field text indirect(makecell(2, select_line+ 3))
  247.         end if
  248.     add text "
  249. " at (0.5inch,1.8inch)+(1.2inch,0.28inch)
  250.         no line border
  251.         if n = 2
  252.             add check box  "
  253. " at (1.5inch,1.8inch)+(1.7inch,0.26inch)
  254.             check box 1; check box 2
  255.         else
  256.             add radio button "
  257. " at (1.5inch,1.8inch)+(1.7inch,0.26inch)
  258.             if not n
  259.                 if indirect(makecell(3, select_line+ 3)) = "
  260.                     radio button 1
  261.                 else
  262.                     radio button 2
  263.                 end if
  264.             end if
  265.         end if
  266.         no line border
  267.     add text "
  268. " at (0.5inch,2.2inch)+(1.2inch,0.28inch)
  269.         no line border
  270.         if n = 2
  271.             add field at (1.5inch,2.2inch)+(1.2inch,0.29inch)
  272.         else
  273.             add number wheel  at (1.5inch,2.2inch)+(1.2inch,0.3inch)
  274.             number wheel range 1 to 100
  275.             number wheel step 1
  276.             if n
  277.                 number wheel position 20
  278.             else 
  279.                 number wheel position indirect(makecell(4, select_line+ 3))
  280.             end if
  281.             number wheel precision 0
  282.         end if
  283.     add text "TEL" at (0.5inch,2.6inch)+(1.2inch,0.28inch)
  284.         no line border
  285.         add field at (1.5inch,2.6inch)+(2.1inch,0.28inch)
  286.         if not n
  287.             field text indirect(makecell(5, select_line+ 3))
  288.         end if
  289.     add text "
  290. " at (0.5inch,3.0inch)+(1.2inch,0.28inch)
  291.         no line border
  292.         add field at (1.2inch,3.0inch)+(1.1inch,0.28inch)
  293.         if not n
  294.             field text indirect(makecell(6, select_line+ 3))
  295.         end if
  296.         control name "
  297.         add field at (2.45inch,3.0inch)+(2.1inch,0.28inch)
  298.         if not n
  299.             field text indirect(makecell(7, select_line+ 3))
  300.         end if
  301.         control name "
  302.         add field at (4.7inch,3.0inch)+(2.1inch,0.28inch)
  303.         if not n
  304.             field text indirect(makecell(8, select_line+ 3))
  305.         end if
  306.         control name "
  307.         add field at (1.2inch,3.4inch)+(2.4inch,0.28inch)
  308.         if not n
  309.             field text indirect(makecell(9, select_line+ 3))
  310.         end if
  311.         control name "
  312.         add field at (4.0inch,3.4inch)+(2.4inch,0.28inch)
  313.         if not n
  314.             field text indirect(makecell(10, select_line+ 3))
  315.         end if
  316.         control name "
  317.     add text "
  318. " at (0inch,0.6inch)+(7inch,0inch)
  319.     use dialog box
  320.     return cancel_op
  321. end function
  322. function SetData()
  323.     define temp
  324.     yomi = ctstring(5,0)
  325.     name = ctstring(7,0)
  326.     temp = ctvalue(9,1)                    {HyperScript
  327.     sex = bitor( ctvalue(9,2)*2 , temp)    {3=
  328. j, 0= 
  329.     age = value(ctstring(11,0))            {Number Wheel 
  330.  field 
  331.     tel = ctstring(13,0)
  332.     zip = ctstring(15,0)
  333.     state = ctstring(16,0)
  334.     city = ctstring(17,0)
  335.     addr1 = ctstring(18,0)
  336.     addr2 = ctstring(19,0)
  337. end function
  338. function ad_help()
  339.     new modal dialog box at (-1, -1) (6inch, 4.1inch)
  340.     add push button  "
  341. " at (2.5inch, 3.7inch)+(1inch, 0.35inch)
  342.     dialog default push button
  343.     add field at (.1inch, .1inch)+(5.8inch, 3.4inch)
  344.     show scroll bar field
  345.     field text
  346. replace field text "JVR" with 
  347. JVR" options "A"
  348. replace field text "JVR" with 
  349. JVR" options "A"
  350. replace field text "JVR" with 
  351. JVR" options "A"
  352. replace field text "JVR" with 
  353. JVR" options "A"
  354. replace field text "JVR" with 
  355. JVR" options "A"
  356. replace field text "JVR" with 
  357. JVR" options "A"
  358. replace field text "JVR" with 
  359. gPRSHEET.SCZ
  360. B" options "A"
  361.     field top margin 360
  362.     field left margin 360
  363.     field right margin 360
  364.     field justification flush
  365.     field single font
  366.     text font "System"
  367.     text size 12
  368.     field multiple fonts
  369.     find field text "
  370. :" options "BA" ; text style "B" ; text color red()
  371.     find field text "
  372. :" options "BA" ; text style "B" ; text color red()
  373.     find field text "
  374. X:" options "BA" ; text style "B" ; text color red()
  375.     find field text "
  376. :" options "BA" ; text style "B" ; text color red()
  377.     find field text "
  378. o:" options "BA" ; text style "B" ; text color red()
  379.     find field text "
  380. :" options "BA" ; text style "B" ; text color red()
  381.     find field text "
  382. " options "A"
  383.     text style "BO"
  384.     text size 18
  385.     text color blue()
  386.     repaint selections off
  387.     use dialog box
  388.     repaint selections on
  389.     repaint window
  390. end function  
  391.